d = 'hubei'
print(d[-1:]+d[1:-1]+d[:1])
d = 'student'
print(d[-1:]+d[1:-1]+d[:1])
